//c.f. http://www.blogjava.net/chengang/archive/2006/12/12/87353.html

package sjtu.edu.cn.se.compiler11.gui;
import org.eclipse.swt.SWT;

import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.RowData;
import org.eclipse.swt.layout.RowLayout;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

public class StatusBar extends Composite{
	private Label statusbarLabel;
	
	public StatusBar(Composite parent)
	{
		super(parent, SWT.BORDER);
		GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
		gridData.heightHint = 20;
		setLayoutData(gridData);
		RowLayout layout = new RowLayout();
		layout.marginLeft = layout.marginTop = 0; 
		setLayout(layout);
		statusbarLabel = new Label(this, SWT.BORDER);
		statusbarLabel.setLayoutData(new RowData(980, -1));
	}
   
	public void SetText(String text)
	{
		statusbarLabel.setText(text);
	}
}
